package com.xzh.seckill.controller;


import com.xzh.seckill.pojo.User;
import com.xzh.seckill.rabbitmq.MQSender;
import com.xzh.seckill.vo.RespBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xzh
 * @since 2022-05-09
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private MQSender mqSender;
    @RequestMapping("/info")
    @ResponseBody
    public RespBean info(User user)
    {
        return RespBean.success(user);
    }

    /*
    测试发送Rabbit MQ的消息
    * */
    /*@RequestMapping("/mq")
    public void mq(){
        mqSender.send01("queue.hah");
        mqSender.send02("queue.dasd.sad.无线");
    }*/
}
